package com.qingsong.service;

import com.qingsong.entity.Course;
import com.qingsong.es.CourseDoc;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface CourseRepository extends ElasticsearchRepository<Course, Long> {
    // 可以根据需要添加自定义查询方法
    Page<CourseDoc> findAllBy(Pageable pageable);
    Page<CourseDoc> searchByTitleOrAuthorOrderByIdx(String keyword, String keyword1, Pageable pageable);
}